/**
 * 
 */
package com.cn.practice.facade;

/**
 * 外观模式练习
 * @author zhangyang
 *
 */
public class FacadePractice {
public static void main(String[] args) {
	HomeTheaterFacade theaterFacade = new HomeTheaterFacade();
	theaterFacade.ready();
}
}

class DvdPlayer{
	void on() {
		System.out.println("打开DVD");
	}
	void off() {
		System.out.println("关上DVD");
	}
	void pause() {
		System.out.println("暂停播放DVD");
	}
	void procceed() {
		System.out.println("继续播放DVD");
	}
}
class TV{
	void on() {
		System.out.println("打开电视");
	}
	void off() {
		System.out.println("关上电视");
	}
	void loud() {
		System.out.println("调大音量");
	}
	void quiet() {
		System.out.println("调小音量");
	}
}

class HomeTheaterFacade{
	TV tv=new TV();
	DvdPlayer dvd=new DvdPlayer();
	void ready() {
		tv.on();
		dvd.on();
	}
	void end() {
		dvd.off();
		tv.off();
	}
	void loud() {
		tv.loud();
	}
}